<?php

class IndexController extends AController
{
	// ------------------------------------------------------------------------------------

	public $title = 'Корниш-рекс';

	// ------------------------------------------------------------------------------------
	/**
	 * @return void
	 */
	public function actionIndex()
	{
		$Criteria = new CDbCriteria();
		$Criteria->addCondition(array('`page_style_top` > 0', '`page_style_left` > 0'));
		$Criteria->order = '`page_priority` DESC';
		$Pages = PagesLib::i()->findAll($Criteria);

		$this->render('index', array(
			'pages' => $Pages
		));
	}

	// ------------------------------------------------------------------------------------
}